<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>modal</title>

    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <!-- 可选的Bootstrap主题文件（一般不用引入） -->
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <!--  <script src="js/lib/bootstrap.min.js" type="text/javascript"></script>-->
</head>
<body>
<span class="icon-edit" href="#productModal" data-toggle="modal" style="cursor:pointer;padding-left:5px;">修改</span>
<div class="modal fade" id="productModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:60%">
        <div class="modal-content">
            <div class="modal-header" style="position: fixed;width: 98%;height: 50px">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 style="font-weight: 800" class="modal-title" id="myModalLabel" >Modal title</h4>
            </div>
            <div>
                123213 <br/>
                123213 <br/>
                123213 <br/>
                123213 <br/>
                123213 <br/>
                123213 <br/>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" onclick="saveOrUpdate()">确定</button>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function a(){
        $('#productModal').modal('show')
    }
        a();
    function saveOrUpdate(){
        $('#productModal').modal("hide");// 模态框消失
    }
</script>

</body>
</html>